<template>
    <div class="pt-[80px]">
        <n-result status="500" title="错误提示" :description="error.message">
            <template #footer>
                <n-button @click="handleError">回到首页</n-button>
            </template>
        </n-result>
    </div>
</template>

<script setup>
// import { NResult, NButton } from "naive-ui"

import {NButton} from "naive-ui"
import {NResult} from "naive-ui"
const props = defineProps({
    error: Object
})
const route=useRoute()
onMounted(()=>{
    console.log(1)
    clearError({ redirect: route.path })
})
const handleError = () => clearError({ redirect: '/' })
</script>